/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.telsoft.security.business;

import com.telsoft.security.data.SEC_DATA_User;
import com.telsoft.security.entity.SEC_ETT_User;
import java.util.List;

/**
 *
 * @author nguyenthang
 */
public class SEC_BU_User {   
    public static SEC_ETT_User getPassWordbyUserName(String username)
    {
        SEC_DATA_User DA = new SEC_DATA_User();
        return DA.getPassWordbyUserName(username);
    }
    public static List<SEC_ETT_User> getAllUser(){
        SEC_DATA_User DA = new SEC_DATA_User();
        return DA.getAllUser();
    }
    public static void addUser(SEC_ETT_User newUser){
        SEC_DATA_User DA = new SEC_DATA_User();
        DA.addUser(newUser);
    }
    public static void editUser(int curUser, SEC_ETT_User newUser){
        SEC_DATA_User DA = new SEC_DATA_User();
        DA.updateUser(curUser,newUser);
    }
    public static void deleteUser(int UserID){
        SEC_DATA_User DA = new SEC_DATA_User();
        DA.deleteUser(UserID);
    }
    public static SEC_ETT_User getUserByID(int user){
        SEC_DATA_User DA = new SEC_DATA_User();
        return DA.getUserByID(user);
    }
    public static SEC_ETT_User getUserByName(String UserName){
        SEC_DATA_User DA = new SEC_DATA_User();
        return DA.getUserByUserName(UserName);
    }
}